<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>菜单导航</title>
	<meta name="decorator" content="sysDefault"/>
	<script type="text/javascript"> 
		$(document).ready(function() {
			$("#menu .panel-title a").click(function(){
				var $span = $(this).find("span").filter(".glyphicon");
				$span.toggleClass("glyphicon-chevron-down");
				$span.toggleClass("glyphicon-chevron-right");
			});
		});
	</script>
</head>
<body>
	<div class="panel-group" id="menu">
	  	<c:forEach items="${list}" var="menu" varStatus="i">
		  <div class="panel panel-default">
		    <div class="panel-heading">
		      <h4 class="panel-title">
		        <a data-toggle="collapse" data-toggle="collapse" data-parent="#accordion" href="#collapse${i.index}">
		         <span class="title">${menu.name}</span>
		        </a>
		      </h4>
		    </div>
		    <div id="collapse${i.index}" class="panel-collapse collapse in">
		      <div class="panel-body">
		        <ul class="nav o-sidenav">
		        <c:forEach items="${childlist}" var="menu2">
		        	<c:if test="${menu.id==menu2.parentid}">
			        	<li><a href="${contextPath}${menu2.href}" target="${menu2.target}"><span class="glyphicon glyphicon-th btn-sm"></span>&nbsp;&nbsp;${menu2.name}</a></li>
		        	</c:if>
		        </c:forEach>
		        </ul>
		      </div>
		    </div>
	  </div>
     </c:forEach>
	</div>
</body>
</html>
